import request from '@/utils/request'

// 查询消耗品出库记录主列表 (分页)
export function selectPageMaterialExportMaster(query) {
  return request({
    url: '/material/materialExportMaster/selectPage',
    method: 'get',
    params: query
  })
}

// 查询消耗品出库记录主列表 (不分页)
export function listMaterialExportMaster(query) {
  return request({
    url: '/material/materialExportMaster/list',
    method: 'get',
    params: query
  })
}

// 查询消耗品出库记录主详细
export function getMaterialExportMaster(exportMasterId) {
  return request({
    url: '/material/materialExportMaster/' + exportMasterId,
    method: 'get'
  })
}

// 新增消耗品出库记录主
export function addMaterialExportMaster(data) {
  return request({
    url: '/material/materialExportMaster',
    method: 'post',
    data: data
  })
}

// 修改消耗品出库记录主
export function updateMaterialExportMaster(data) {
  return request({
    url: '/material/materialExportMaster',
    method: 'put',
    data: data
  })
}

// 删除消耗品出库记录主
export function delMaterialExportMaster(exportMasterId) {
  return request({
    url: '/material/materialExportMaster/' + exportMasterId,
    method: 'delete'
  })
}

// 撤销出库主
export function cancelExportMaster(data) {
    return request({
        url: "/material/materialExportMaster/cancelExportMaster",
        method: "post",
        data: data,
    });
}